Page({
  onPullDownRefresh: function () {
    wx.showNavigationBarLoading() //在标题栏中显示加载
    console.log(9999)
    //模拟加载
    setTimeout(function () {
      // complete
      wx.hideNavigationBarLoading() //完成停止加载
      wx.stopPullDownRefresh() //停止下拉刷新
    }, 1500);
  },
  onLoad: function (options) {
    this.setData({
      title: options.title
    })
    wx.request({
      url: 'https://t.api.air-cooking.com/api/Category/categoryList',
      success: function (res) {
        console.log(res.data)
        console.log(2222)
      }
    })

  },
  onShow: function () {
    wx.showShareMenu({
      withShareTicket: true
    })
  },
  gothree: function () {
    wx.navigateTo({
      url: '../logs/logs'
    })
  },
  data: {
    iconSizes: [10, 20, 30, 40, 50, 60, 70],
    iconColor: ['red', 'orange', 'yellow', 'green', 'rgb(0,255,255)', 'blue', 'purple'],
    iconType: ['success', 'info', 'warn', 'waiting', 'safe_success', 'safe_warn',
      'success_circle', 'success_no_circle', 'waiting_circle', 'circle', 'download',
      'info_circle', 'cancel', 'search', 'clear'],
    imgUrls: [
      'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg',
      'http://t.image.air-cooking.com/cookbook/cover/20170520/591fcf509a5f9.jpg',
      'http://t.image.air-cooking.com/cookbook/cover/20170605/5934f95070df2.jpg',
      'http://t.image.air-cooking.com/cookbook/cover/20170605/5934eafc8be57.jpg'
    ],
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 1000,
    circular: true
  },
  onShareAppMessage: function (res) {
    if (res.from === 'button') {
      // 来自页面内转发按钮
      console.log(res.target)
    }
    return {
      title: '分享给张薇',
      path: '/pages/list/list',
      success: function (res) {
        // 转发成功
      },
      fail: function (res) {
        // 转发失败
      }
    }
  }

})